// import { httpGet, httpPost, httpPut, request } from '@/utils/request'
// import { httpPost, request, httpGet } from '@/utils/request'
import { httpPost, httpGet } from '@/utils/http'

export const login = (data) => {
  console.log('api/user -> login =>' + JSON.stringify(data))
  return httpPost({
    url: '/user/login',
    data
  })
}

export const loginByCode = (data) => {
  console.log('api/loginInviteCode -> login =>' + JSON.stringify(data))
  return httpPost({
    url: '/user/loginInviteCode',
    data
  })
}

export function getInfo() {
  console.log('api/user -> getInfo =>')
  return httpGet({
    url: '/user/details',
    method: 'get'
  })
}

export function logout() {
  console.log('【方法】：logout')
  return httpGet({
    url: '/user/logout',
    method: 'post'
  })
}
